<?php 
/* P3(c)

******************************************************************************
                                                                                      
                         __                                                        
                        /__)                                                       
                       /__        P3 - moving Technologie            
                        __)                                                          
                        __)                                                          
                                                                                        
                                                                                        
       Copyright 2009 by p3.co.at                                                                                 
                                                                                        
       visit www.p3.co.at to get more Informations 
       about Teriko - Betriebsdatenerfassung                                                                                 
       - it's not allowed to change this scripts
       - it's not allowed to remove this copyright-tag

       -- you can download the complete license   
          under http://www.teriko.org

 (c) by Patrik Pfaffenbauer and P3 (http://www.p3.co.at)

 | Programname: P3.Teriko
 | Authtor: P3.Verein
 | Coder: Patrik Pfaffenbauer
 | Version: 0.1

 | Change Index
 |_____________________________________________
 |                                             |
 |4.3.2010 Erstellung | Patrik Pfaffenbauer    |
 |_____________________________________________|

******************************************************************************

P3(c) */
$site = $_GET['s'];

if($_SESSION['loggedIn'] == "")
	$site = "login";
	
if($site == "login")
{
		echo '	
		<div id="content-box">
				<div class="padding">
				<div id="element-box" class="login">
						<div class="t">
							<div class="t">
								<div class="t"></div>
							</div>
						</div>
						<div class="m" ><div id="time"></div>';
}
else
{
	echo '	
		<div id="content-box">
			<div class="border">
				<div class="padding">';		
	new Toolbar();
	echo '			<div id="time"></div><div id="contentActionDiv"></div><div id="element-box">
						<div class="t">
							<div class="t">
								<div class="t"></div>
							</div>
						</div>
						<div class="m" >';
}

if($site == "login")
{
	$content = new Login();
}
else
{
	$content = GetObject($_GET['s']);
}

if($content->allowed)
{
	$content->AnalysPost();
}
else
{
	$content = new Home();
	$content->Paint();
}
		


if($site == "login")
{
	if(isset($_GET['m']))
		$div = '<div style="text-align:center;color=#000;">'.$GLOBALS['lang']->GetLanguage("Login", $_GET['m']).'</div>';
	else
		$div = "";
					
	echo '<div class="clr"></div>
			</div>
			<div class="b">
				<div class="b">
		 			<div class="b"></div>

				</div>
			</div>
		</div>
		
					<p>'.$GLOBALS['lang']->GetLanguage("Login", "info").'</p>
					<div id="lock"></div>';
			echo $div;
			echo	'<div class="clr"></div>
				</div>
				<div class="b">
					<div class="b">
						<div class="b"></div>
					</div>
				</div>
			</div>
			<noscript>'.$GLOBALS['lang']->GetLanguage("Common", "Java-Error").'</noscript>

			<div class="clr"></div>
		</div>
	</div>
	';
}
else
{
	echo '</div>
			<div class="clr"></div>
		<div class="b">
			<div class="b">
				<div class="b"></div>
				</div>
			</div>
		</div>
		 <div class="clr"></div>';
		 
		//new FooterToolbar($content);
 
		echo '<noscript>'.$GLOBALS['lang']->GetLanguage("Common", "Java-Error").'</noscript>
		<div class="clr"></div>
		</div>
		</div>
		</div>';
}

?>